/*
 * Author: 李波(Edwin Lee)
 * Date: 2024-08-20 02:47:09
 * FilePath: /mprpc/src/mprpccontroller.cc
 * LastEditTime: 2024-08-20 08:03:10
 * version: 1.0
 * Description: 
 */
#include "mprpccontroller.h"

MprpcController::MprpcController():failed_(false),errText_("")
{
}

void MprpcController::Reset()
{
    failed_ = false;
    errText_.clear();
}

bool MprpcController::Failed() const
{
    return failed_;
}

std::string MprpcController::ErrorText() const
{
    return errText_;
}
void MprpcController::SetFailed(const std::string& reason)
{
    failed_ = true;
    errText_ = reason;
}

// 目前未实现的功能
void MprpcController::StartCancel(){}
bool MprpcController::IsCanceled() const {return true;}
void MprpcController::NotifyOnCancel(google::protobuf::Closure* callback){}